namespace DotNetNuke.Services.Wizards
{
    using DotNetNuke.Services.Localization;
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    /// -----------------------------------------------------------------------------
    /// <summary>
    /// The WizardSuccess UserControl provides a default success page for the Wizard
    /// Framework
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// [cnurse]	10/13/2004	created
    /// </history>
    /// -----------------------------------------------------------------------------
    public class WizardSuccess : UserControl
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        //("lblDetail")]
        private Label _lblDetail;
        //("lblMessage")]
        private Label _lblMessage;
        //("lblTitle")]
        private Label _lblTitle;
        private object designerPlaceholderDeclaration;
        private string m_Message;
        private bool m_Type;
        private string MyFileName;

        public WizardSuccess()
        {
            base.Init += new EventHandler(this.Page_Init);
            base.PreRender += new EventHandler(this.Page_PreRender);
            List<WeakReference> refObjectHelperL0 = __ENCList;
            lock (refObjectHelperL0)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.MyFileName = "Success.ascx";
            this.m_Message = "";
            this.m_Type = true;
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
        }

        private void Page_Init(object sender, EventArgs e)
        {
            this.InitializeComponent();
        }

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Page_PreRender runs just before the control is rendered
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// [cnurse]	10/13/2004	created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void Page_PreRender(object sender, EventArgs e)
        {
            if (this.m_Type)
            {
                this.lblTitle.Text = DotNetNuke.Services.Localization.Localization.GetString("Wizard.Success.SuccessTitle");
                this.lblDetail.Text = DotNetNuke.Services.Localization.Localization.GetString("Wizard.Success.SuccessDetail");
                this.lblMessage.CssClass = "WizardText";
            }
            else
            {
                this.lblTitle.Text = DotNetNuke.Services.Localization.Localization.GetString("Wizard.Success.FailureTitle");
                this.lblDetail.Text = DotNetNuke.Services.Localization.Localization.GetString("Wizard.Success.FailureDetail");
                this.lblMessage.CssClass = "NormalRed";
            }
            this.lblMessage.Text = this.m_Message;
        }

        protected virtual Label lblDetail
        {
           
            get
            {
                return this._lblDetail;
            }
            
            set
            {
                this._lblDetail = value;
            }
        }

        protected virtual Label lblMessage
        {
           
            get
            {
                return this._lblMessage;
            }
            
            set
            {
                this._lblMessage = value;
            }
        }

        protected virtual Label lblTitle
        {
           
            get
            {
                return this._lblTitle;
            }
            
            set
            {
                this._lblTitle = value;
            }
        }

        public string Message
        {
            get
            {
                return this.m_Message;
            }
            set
            {
                this.m_Message = value;
            }
        }

        public bool Type
        {
            get
            {
                return this.m_Type;
            }
            set
            {
                this.m_Type = value;
            }
        }
    }
}

